package vmcs.ui.interfacecontrol;

import vmcs.controller.MachineryController;
import vmcs.controller.MaintenanceController;
import vmcs.controller.SimulationController;
import vmcs.controller.TransactionController;
import vmcs.simulationsystem.MachinerySimulationPanel;
import vmcs.simulationsystem.MaintenanceSimulationPanel;
import vmcs.simulationsystem.SimulatorControlPanel;

public class UIController {

	public static ICustomerPanel getCustomerPanel(ISimulatorPanel startUpPanel, TransactionController transactionController) {
		CustomerPanelBuilder cpb = ControlFactory.getCustomerPanelBuilder(startUpPanel, transactionController);
		DirectorUI d = new DirectorUI();
		d.makeCustomerPanel(cpb);
		return cpb.getCustomerPanel();
	}	

	public static IMachineryPanel getMachinerySimulatorPanel(ISimulatorPanel startUpPanel, MachineryController machineryController) {
		MachineryPanelBuilder mpb = ControlFactory.getMachineryPanelBuilder(startUpPanel, machineryController);
		DirectorUI d = new DirectorUI();
		d.makeMachineryPanel(mpb);
		return mpb.getMachineryPanel();
	}	

	public static ISimulatorPanel getSimulatorControlPanel(SimulationController simulationController) {
		SimulatorPanelBuilder spb = ControlFactory.getSimulatorPanelBuilder(simulationController);
		DirectorUI d = new DirectorUI();
		d.makeSimulatorPanel(spb);
		return spb.getSimulatorPanel();
	}	

	public static IMaintenancePanel getMaintenancePanel(ISimulatorPanel startUpPanel, MaintenanceController maintenanceController) {
		MaintenancePanelBuilder mpb = ControlFactory.getMaintenancePanelBuilder(startUpPanel, maintenanceController);
		DirectorUI d = new DirectorUI();
		d.makeMaintenancePanel(mpb);
		return mpb.getMaintenancePanel();
	}
}
